<html>
<head><meta charset="utf-8"><title>RA/vscode showing diagnostics for external crate and stdlib · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html">RA/vscode showing diagnostics for external crate and stdlib</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="247265353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247265353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrew Chin (eminence) <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247265353">(Jul 26 2021 at 21:22)</a>:</h4>
<p>Hi all.  sometimes RA+VSCode is giving me weird diagnostics for external crates, or for stdlib.  This doesn't happen consistently, but will probably happen several times per dev session.  Is this a known issue? (I looked through the issue tracker and didn't see anything)</p>
<p><a href="/user_uploads/4715/oXHLCrb2IeNsB0-ZYjzsp_Tz/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/oXHLCrb2IeNsB0-ZYjzsp_Tz/image.png" title="image.png"><img src="/user_uploads/4715/oXHLCrb2IeNsB0-ZYjzsp_Tz/image.png"></a></div>



<a name="247265617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247265617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247265617">(Jul 26 2021 at 21:24)</a>:</h4>
<p>Rust-analyzer emitted errors like these are only shown for open files.</p>



<a name="247265917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247265917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrew Chin (eminence) <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247265917">(Jul 26 2021 at 21:27)</a>:</h4>
<p>those files aren't open, but if i open them and then close them, they get removed from the diagnostics window</p>



<a name="247265945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247265945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247265945">(Jul 26 2021 at 21:27)</a>:</h4>
<p>huh</p>



<a name="247266005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247266005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrew Chin (eminence) <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247266005">(Jul 26 2021 at 21:27)</a>:</h4>
<p>it's not a new problem.  i've been noticing it for months.  i've been trying to figure out what makes it happen, but no luck on that so far</p>



<a name="247268999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247268999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247268999">(Jul 26 2021 at 21:55)</a>:</h4>
<p>The missing match arm i have seen from time to time as well</p>



<a name="247269107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247269107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247269107">(Jul 26 2021 at 21:56)</a>:</h4>
<p>Its being emitted for an impl related to the new try trait where our match check emits a false positive currently.</p>



<a name="247269128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247269128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247269128">(Jul 26 2021 at 21:56)</a>:</h4>
<p>Really weird that it only appears sometimes though</p>



<a name="247323424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/247323424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Mcnab <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#247323424">(Jul 27 2021 at 12:01)</a>:</h4>
<p>I also see this behaviour, for standard library stuff<br>
I just assume it's because I go to definition in one of the files we can't handle<br>
But I haven't verified that</p>



<a name="248173161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/RA/vscode%20showing%20diagnostics%20for%20external%20crate%20and%20stdlib/near/248173161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrew Chin (eminence) <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/RA.2Fvscode.20showing.20diagnostics.20for.20external.20crate.20and.20stdlib.html#248173161">(Aug 03 2021 at 01:22)</a>:</h4>
<p>hrm.  the latest release of RA has made this problem slightly worse due to <a href="https://github.com/rust-analyzer/rust-analyzer/pull/9558">#9558</a> i think</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>